package com.apicloud.modulefloatwebview;

import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.os.Build;
import android.os.IBinder;
import android.support.v4.app.NotificationCompat;

public class FloatWebViewService extends Service {

    @Override
    public IBinder onBind(Intent intent) {
        // TODO: 将通信通道返回到服务。
        return null;
    }
    @Override
    public void onCreate() {
        super.onCreate();
//        startForeground(0x1001, notification); //开启前台通知服务
    }
    public FloatWebViewService(){}
    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        return super.onStartCommand(intent, flags, startId);
    }
    @Override
    public void onConfigurationChanged(Configuration newConfig){
        switch (newConfig.orientation){
            case Configuration.ORIENTATION_LANDSCAPE:
                FloatWebView.isPortrait = false;
                break;
            case Configuration.ORIENTATION_PORTRAIT:
                FloatWebView.isPortrait = true;
                break;
        }
    }
}
